<%@page import="com.yymmarket.forum.util.DateUtil,com.yymmarket.forum.util.LevelUtil,com.yymmarket.forum.cache.ForumCache,com.yymmarket.forum.admin.AdminBean,com.yymmarket.forum.util.SessionUtil,com.yymmarket.framework.PagingBean,com.yymmarket.forum.util.BaseUtil,com.yymmarket.util.StringUtil,com.yymmarket.forum.bbs.ContentBean,java.util.List,com.yymmarket.forum.bbs.ContentService,com.yymmarket.forum.bbs.BBSService,com.yymmarket.framework.WebAction"%><%@ 
page contentType="text/vnd.wap.wml;charset=utf-8"%><%
response.setHeader("Cache-Control","no-cache");
WebAction webAction = new WebAction(request,response);
int id = webAction.getParameterInt("id");

int p = webAction.getParameterInt("p");

BBSService bbs = BBSService.getInstance();
ContentService contentService = ContentService.getInstance();
Integer uid = SessionUtil.getSessionUserId(request);
int limit = 10;
int start = p * limit;
List<Integer> contentList = contentService.getContentsByIdAndUserId(id,uid,start,limit);
int count = contentList.size();




PagingBean paging = new PagingBean(webAction,count,limit,"p");

%><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="我发布的帖子">
<p><%= BaseUtil.top(request,response) %><a href="forum.jsp?id=<%=id %>">全部</a>|<a href="prime.jsp?id=<%=id %>">精华</a>|我的帖子<br/><%
int size = contentList.size();
if(size == 0){
	%>你还没有发表任何帖子<br/><%
} else {
	

	for(int i = 0;i<size;i++) {
	ContentBean bean = contentService.getContentById(contentList.get(i));
%><%if(bean.isPrime()){%><%="[精]"%><%}else{%><%=i+1+p*limit%>.<%} %><a href="content.jsp?id=<%=bean.getId() %>&amp;fid=<%=bean.getBbsId() %>&amp;p1=<%=p %>"><%=StringUtil.toWml(bean.getTitle()) %></a>(回<%=bean.getReplyCount()%>|阅<%=bean.getReadCount()%>)<br/>
&gt;<%=StringUtil.toWml(bean.getUserName()) %>|<%=DateUtil.converDateToBefore(bean.getLastReplyTime(),"hh:mm") %><br/>
<%} %><%=paging.shuzifenye(response.encodeURL("myPost.jsp?id="+id),true,"|",response) %><%} %>
<a href="post.jsp?id=<%=id %>">&gt;&gt;发表帖子</a>|<a href="postX.jsp?id=<%=id %>">WAP2.0发表</a><br/>
<a href="forum.jsp?id=<%=id %>">&lt;&lt;返回<%=ForumCache.getBBSBean(id).getTitle() %></a><br/>
<a href="index.jsp">&lt;&lt;返回论坛</a><br/>
<%= BaseUtil.bottom(request,response) %></p>
</card>
</wml>